package com.fortune.service.impl;

import com.fortune.dao.WechatProductDao;
import com.fortune.service.WechatProductSevice;
import com.fortune.vo.wechatProduct.Product;
import com.fortune.vo.wechatProduct.TerminalDiscount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WechatProductSeviceImpl implements WechatProductSevice {
    @Autowired
    private WechatProductDao wechatProductDao;

    /**
     * 查询优惠政策
     * @param mid
     * @return
     */
    @Override
    public TerminalDiscount findTerminalDiscount(String mid) {
        TerminalDiscount findTerminalDiscount = wechatProductDao.findTerminalDiscount(mid);
        return findTerminalDiscount;
    }

    /**
     * 查询商品列表
     * @param mid
     * @return
     */
    @Override
    public List<Product> findListProducts(String mid) {
        List<Product> findListProducts = wechatProductDao.findListProducts(mid);
        return findListProducts;
    }
}
